package com.itheima.App;

import com.itheima.pojo.Setterjihe;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Map;
import java.util.Set;

public class SetterjiheTest {
    public static void main(String[] args) {
        ApplicationContext ca = new ClassPathXmlApplicationContext("applicationContext.xml");
        Setterjihe setterjihe = (Setterjihe) ca.getBean("setterjihe");
        for (String s : setterjihe.getArray()) {
            System.out.println(s);
        }
        for (String s : setterjihe.getSet()) {
            System.out.println(s);
        }
        for (String s : setterjihe.getList()) {
            System.out.println(s);
        }
        Map<String, String> map = setterjihe.getMap();
        Set<Map.Entry<String, String>> entries = map.entrySet();
        for (Map.Entry<String, String> entry : entries) {
            System.out.println(entry.getKey());
            System.out.println(entry.getValue());
        }

    }
}
